package top.yiwyn.domain;


import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class LogEntity {

    private int id;
    private String message;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String color = "grey";

    private LogEntity() {
    }

    public LogEntity(String message) {
        this.message = message;
        createTime = new Date();
    }

    public LogEntity(String message, String color) {
        this.message = message;
        this.color = color;
        createTime = new Date();
    }


    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
